// public class Stats<T> {
public class Stats<T extends Number> {
    T[] arr;

    public Stats(T[] arr) {
        this.arr = arr;
    }

    public T[] getArr() {
        return arr;
    }

    public void setArr(T[] arr) {
        this.arr = arr;
    }

    public double average() {
        double sum = 0;

        for (int i = 0; i < arr.length; i++) {
            // sum = sum + Double.parseDouble((String) arr[i]);
            sum = sum + arr[i].doubleValue();
        }

        return sum / arr.length;
    }
}
